import { createPinia } from "pinia"
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
const pinia=createPinia()
pinia.use(piniaPluginPersistedstate)


/**
 * @description 自定义pinia持久化API存储方式为uni
 */
function createPersistUni() {
	return createPersistedState({
		storage: {
			getItem: uni.getStorageSync,
			setItem: uni.setStorageSync
		}
	})
}

export default pinia
export * from './modules/user.js'
export * from './modules/docdata.js'